package com.movieproject.daos;

import java.util.List;
import java.util.Map;

import com.movieproject.dataobjects.Movie;
import com.movieproject.dataobjects.Queue;
import com.movieproject.dataobjects.QueueRecord;
import com.movieproject.dataobjects.User;

public interface QueueDAO {
    	public Map<User, List<Movie>> getAllUserQueues();
    	public List<Movie> getUserQueue(User user);
    	public void updateUserQueue(User user, List<Movie> queue);
    	public void deleteUserQueue(User user);
    	public void addMovie(User user, Movie movie); //adds movie to tail of queue
    	public Movie peekMovie(User user); //returns head of queue without removing it
    	public Movie peekInStockMovie(User user); // returns the first in stock movie without removing it
    	public Movie pollMovie(User user); // returns and removes head of queue
    	public Movie pollInStockMovie(User user); // returns and removes the first in stock movie
		public void insert(Queue queue);
		List<QueueRecord> getAllQueues();
		public List<QueueRecord> getQueueListForUser(User user);
}


/* Updated version using the Queue data object */
//package com.movieproject.daos;
//
//import java.util.List;
//
//import com.movieproject.dataobjects.Movie;
//import com.movieproject.dataobjects.Queue;
//import com.movieproject.dataobjects.User;
//
//public interface QueueDAO {
//    	public List<Queue> getAllQueues();
//    	public List<Queue> getUserQueue(User user);
//    	public List<Queue> getMovieQueue(Movie movie);
//    	
//    	public void addUserQueue(Queue queue); // adds a new movie to a user's queue
//    	public void updateUserQueue(Queue queue); // changes the position of a movie in a user's queue
//    	public void deleteUserQueue(Queue queue); // removes a movie from a user's queue
//}
